import Interface.Login;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import utils.BancoDeDados;


public class Ludi {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
            BancoDeDados banco = null;
        
        while (banco == null){
            try {
                banco = new BancoDeDados("localhost", 3306, "ludi", "javatar", "ludiBD", "mysql");
                banco.start();
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(Ludi.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SQLException ex) {
        	Logger.getLogger(Ludi.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (InstantiationException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    } catch (UnsupportedLookAndFeelException e) {
      e.printStackTrace();
    }

        new Login(banco);
	}

}